﻿//===============================================================================
// Microsoft Malaysia Sdn Bhd
// Malaysia Software Economy
// Issue Tracker 3.5
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================


using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace IssueTracker.Helper
{
    public class WorkflowServiceContextHelper
    {

        private const string contextNS = "http://schemas.microsoft.com/ws/2006/05/context";
        private const string contextName = "InstanceId";

        static public IDictionary<string, string> CreateContextFromGuid(Guid instanceId)
        {
            Dictionary<string, string> context = new Dictionary<string, string>();
            context["instanceId"] = instanceId.ToString();
            return context;
        }

        static public Guid GetGuidFromContext(IDictionary<string, string> context)
        {
            string instanceId = context["instanceId"];
            return new Guid(instanceId);
        }
    }
}